<link rel="stylesheet" type="text/css" href="{$smarty.const.THEME_RELATIVE}modules/depmodule/css/depmodule.css">
{* Bread cum *}
<ol class="breadcrumbs">
	<li><a href="/">{$_TR.homepage}</a></li>
	<li {if $breadcum_count == 0}class="active"{/if}><a href="{$dep_link}" title="{$config->dep_name}">{$config->dep_name}</a></li>
	{if $breadcum_count >0 }
		{foreach from=$breadcum item='bc' name='bcf'}
			<li {if $smarty.foreach.bcf.last == 1}class="active"{/if}><a href="{link action=view id=$bc->seo_name}">{$bc->title}</a></li>
		{/foreach}
	{/if}
</ol>
{* End Bread cum *}
<div class="clearShadow">
	<h1  class="bigTitle">{if $current_node->title != ''}{$current_node->title}{else}{$config->dep_name}{/if}</h1>
</div>
{* Begin content *}
<div id="content">
	{if $current_node->dont_show_info == 0}
	    {$main_content}
	{/if}
	{if $config->list_sub == 1}
        {if $current_node->module_name == "containermodule"}
            {chain module=$current_node->module_name view='Default' src=$current_node->article_src}
        {else}
	        {chain module=$current_node->module_name view='_Default_for_Depmodule' src=$current_node->article_src}
        {/if}
	{/if}
</div>
{* End main content *}
{* Begin of Sidebar *}
<div id="sidebar">
	<div class="view browseBy hasChrome" id="categorySideBar">
		<div class="chrome "><div class="tl"></div><div class="tr"></div><div class="bl"></div><div class="br"></div></div>
		<div class="chromeContent depmodule">
			<h2 class="gl header black short"><a href="{$dep_link}" title="{$config->dep_name}" style="color: #FFFFFF;">{$config->dep_name}</a><span></span></h2>
			<ul style="padding: 0px;">
				<li class="last-child" style="padding: 0;">
					<ul id="categoryList" class="depmodule_bigclass">
						{assign var=startdepth value=0}
							{foreach name="children" key=key from=$links item=section}
							{assign var=nextkey value=`$key+1`}
							{assign var=previouskey value=`$key-1`}

							{if $links[$previouskey]->depth < $section->depth && $smarty.foreach.children.first!=true}
							<ul class="sub_node">
							{/if}
							<li class="{if $section->expanded == 1}expanded active-trail{else}leaf{/if}">
									{permissions level=$smarty.const.UILEVEL_NORMAL}
									{if $permissions.edit == 1 || $permissions.delete == 1}
										<div class="depmodule_controlaction">
										{if $permissions.create == 1}
										<a href="{link action=edit parent=$section->id}"><img class="mngmnt_icon" src="{$smarty.const.ICON_RELATIVE}add.png" title="{$_TR.alt_create}" alt="{$_TR.alt_create}" /></a>
										{/if}
										{if $permissions.edit == 1}
										<a href="{link action=edit id=$section->id}"><img class="mngmnt_icon" src="{$smarty.const.ICON_RELATIVE}edit.png" title="{$_TR.alt_edit}" alt="{$_TR.alt_edit}" /></a>
										{/if}
										{if $permissions.delete == 1}
										<a href="{link action=delete id=$section->id}"><img class="mngmnt_icon" src="{$smarty.const.ICON_RELATIVE}delete.png" title="{$_TR.alt_delete}" alt="{$_TR.alt_delete}" onclick="return confirm('{$_TR.delete_link_confirm}');" /></a>
										{/if}
										</div>
									{/if}
									{/permissions}
									
									<a {if $section->expanded == 1}class="{if $section->active ==1}active{/if} active-trail"{/if} href="{link action=view id=$section->seo_name}">{$section->title}</a>
							{if $links[$nextkey]->depth == $section->depth}
								</li>
							{/if}

							{if $links[$nextkey]->depth < $section->depth}
								{if $smarty.foreach.children.last==true}
									{assign var=nextdepth value=$startdepth}
								{else}
									{assign var=nextdepth value=$links[$nextkey]->depth}
								{/if}
								{math equation="x-y" x=$section->depth y=$nextdepth assign=looper}
								{assign var='looper' value=$looper-1}
								{section name="close" loop=$looper}
										</li>
									</ul>
								{/section}
								</li>
								{/if}
							{/foreach}
					</ul>
				</li>
			</ul>
			{permissions level=$smarty.const.UILEVEL_NORMAL}
			{if $permissions.create == 1}
			<a class="create" href="{link action=edit}">New Node</a>
			{/if}
			{/permissions}
		</div>
	</div>
	{if $config->chain_src != ''}
	{chain module=containermodule view=Default src=$config->chain_src}
	{/if}
</div>